<?php
//判断是否POST传递参数,注意区分大小写
if ($_SERVER["REQUEST_METHOD"] != "POST") {
    echo("<span class='result_false'>提交方法错误!</span>");
    exit();
}

$user_id = $_POST['user_id'];
$user_name = $_POST['user_name'];
$user_passwd = $_POST['user_passwd'];

include("user_db_connect.php");

$sql = "delete from tbl_user2
            where col_user_id = '$user_id'";

if (mysqli_query($link, $sql)) {
    echo("<span class='result_ok'>删除用户<b>$user_name</b>成功!</span>");
} else {
    echo("<span class='result_false'>删除用户<b>$user_name</b>失败:<br>mysqli_errno($link)<br>mysqli_error($link)</span>");
}
mysqli_close($link);
?>